package com.iwhalecloud.bss.kite.cucc.spec.impl.query;

import com.iwhalecloud.bss.kite.dataservice.api.IQueryCountLimitRulService;
import com.iwhalecloud.bss.kite.dataservice.entity.CountLimitRul;
import com.iwhalecloud.bss.kite.dataservice.mapper.other.CountLimitRulMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("spec.queryCountLimitRulService")
public class CountLimitRulQueryService implements IQueryCountLimitRulService {

    @Resource
    private CountLimitRulMapper countLimitRulMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public CountLimitRul getMaxValue(String aOfferId, String zOfferId) {
        return countLimitRulMapper.getMaxValue(aOfferId, zOfferId);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public CountLimitRul getCountLimitRul(String limitType, String objId) {
        return countLimitRulMapper.getCountLimitRul(limitType, objId);
    }

}
